package com.timk.goserver.client.compatibility;

/**
 * Holds utility methods for compatibility with Javascript.
 * @author TKington
 *
 */
public class Util {
	/**
	 * Returns true if the character is whitespace.  This only has to
	 * worry about whitespace that will be in the generated SGF, so it's
	 * not quite the same as Character.isWhitespace.
	 * 
	 * @param chr the character
	 * @return true if it's whitespace
	 */
	public static boolean isWhitespace(char chr) {
		if(chr == ' ' || chr == '\r' || chr == '\n' || chr == '\t') {
			return true;
		}
		return false;
	}
}
